From 564a582cce44709a6659e334263703a73649a98a Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 31 Oct 2004 20:23:58 +0000 Subject: [PATCH] Add some UNIX-y if usb do(nothing) stubs. --- gpsbabel/jeeps/gpsserial.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 60b62545f..1953500d2 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -221,6 +221,8 @@ static struct termios gps_ttysave; int32 GPS_Serial_Savetty(const char *port) { int32 fd; + + if (gps_is_usb) return 1; if((fd = open(port, O_RDWR|O_NDELAY))==-1) { @@ -262,6 +264,8 @@ int32 GPS_Serial_Savetty(const char *port) int32 GPS_Serial_Restoretty(const char *port) { int32 fd; + + if (gps_is_usb) return 1; if((fd = open(port, O_RDWR|O_NDELAY))==-1) { @@ -385,6 +389,7 @@ int32 GPS_Serial_Write(int32 handle, const void *obuf, int size) ************************************************************************/ int32 GPS_Serial_Flush(int32 fd) { + if (gps_is_usb) return 1; if(tcflush(fd,TCIOFLUSH)) { @@ -411,6 +416,8 @@ int32 GPS_Serial_Flush(int32 fd) int32 GPS_Serial_Close(int32 fd, const char *port) { + if (gps_is_usb) return 1; + if(close(fd)==-1) { perror("close"); -- 2.30.2